package com.mew.chess.core.game.shbz.game.message;

import com.mew.common.util.PbWriteUtils;
import com.zebra.common.ZebraBaseMessage;
import io.netty.buffer.ByteBuf;
import lombok.*;


@Data
@ToString
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class HitResponseMessage extends ZebraBaseMessage<HitResponseMessage> {

    private int seatNo;
    private int fishId; //鱼ID
    private int  bulletId; //子弹ID；
    private long goldNumber; //背包金币
    private long winNumber; // 赢金币
    private int maxMultiple; // 最大倍数

    @Override
    public void write(ByteBuf b) {

        PbWriteUtils.attr2byte(this,b);
    }

    @Override
    public HitResponseMessage read(ByteBuf b) {
        HitResponseMessage message = new HitResponseMessage();
        message.fishId = readInt(b);
        return message;
    }

}
